package com.yanqu.road.logic.bussiness.activity;

import com.yanqu.road.entity.activity.pasture.PastureUserData;
import com.yanqu.road.entity.activity.pasture.config.PastureAnimalConfig;
import com.yanqu.road.entity.activity.pasture.config.PastureModuleConfig;
import com.yanqu.road.entity.activity.pasture.config.PasturePracticeConfig;
import com.yanqu.road.entity.activity.pasture.config.PastureSkillConfig;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.Map;

/**
 * 牧场点兵
 */
public class PastureBussiness {

    public static Map<Integer, PastureAnimalConfig> getPastureAnimalConfigMap(int activityId) {
        return DaoHelper.getPastureConfigDaoImpl().getPastureAnimalConfig(activityId);
    }

    public static Map<Integer, PastureSkillConfig> getPastureSkillConfigMap(int activityId) {
        return DaoHelper.getPastureConfigDaoImpl().getPastureSkillConfig(activityId);
    }

    public static Map<Integer, PastureModuleConfig> getPastureModuleConfigMap(int activityId) {
        return DaoHelper.getPastureConfigDaoImpl().getPastureModuleConfig(activityId);
    }

    public static Map<Integer, Map<Integer, PasturePracticeConfig>> getPasturePracticeConfigMap(int activityId) {
        return DaoHelper.getPastureConfigDaoImpl().getPasturePracticeConfig(activityId);
    }

    // 牧场数据
    public static PastureUserData getPastureUserData(int activityId, long userId) {
        return DaoHelper.getPastureUserDataDaoImpl().getUserData(activityId, userId);
    }

    public static boolean addPastureUserData(PastureUserData userData) {
        return DaoHelper.getPastureUserDataDaoImpl().add(userData);
    }

    public static boolean updatePastureUserData(PastureUserData userData) {
        return DaoHelper.getPastureUserDataDaoImpl().update(userData);
    }
}
